package com.hmsproject.datastructures.comparators;

import java.util.Comparator;

import com.hmsproject.datastructures.Hotel;

public class HotelStarRatingComparatorDescending implements Comparator<Hotel> {
	
	private static HotelStarRatingComparatorDescending hotelStarRatingComparatorDescending = new HotelStarRatingComparatorDescending();

	@Override
	public int compare(Hotel hotel1, Hotel hotel2) {
		return hotel2.getStarRating()-hotel1.getStarRating();
	}
	
	private HotelStarRatingComparatorDescending(){
		
	}
	
	public static HotelStarRatingComparatorDescending getInstance(){
		return hotelStarRatingComparatorDescending;
	}		

}
